package com.huli.feign;


import com.huli.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("server-coupon")
public interface CouponClient {

    @GetMapping("/getCoupon/{cid}")
    Result getCoupon(@PathVariable("cid") Integer cid);

    @GetMapping("/getUserCoupon")
    Result getUserCoupon(@RequestParam Integer userId);

    @PutMapping("/lessCoupon")
    Result lessCoupon(@RequestParam int userCouponId, @RequestParam int lessNum);
}
